<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateActiviryTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //活动
        Schema::create('activity', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->default(0)->comment('用户id');
            $table->integer('active_party_id')->default(0)->comment('活动方id');
            $table ->string('name')->nullable()->comment('活动名称');
            $table ->integer('img_id')->default(0)->comment('封面图id');
            $table ->string('desc')->nullable()->comment('活动描述');
            $table ->string('theme')->nullable()->comment('活动主题');
            $table->string('province')->nullable()->comment('省份');
            $table->string('city')->nullable()->comment('城市');
            $table->string('area')->nullable()->comment('地区');
            $table->string('address')->nullable()->comment('详细地址');
            $table->timestamp('start_time')->nullable()->comment('活动开始时间');
            $table->timestamp('end_time')->nullable()->comment('活动结束时间');
            $table->string('re_person')->nullable()->comment('负责人');
            $table ->integer('classify_id')->default(0)->comment('活动分类标识');
            $table->text('detail')->nullable()->comment('活动详情');
            $table->integer('video_id')->default(0)->comment('视频');
            $table->decimal('cost')->default(0)->comment('活动费用');
            $table->integer('share_img_id')->default(0)->comment('分享图片');
            $table->integer('qr_code_img_id')->default(0)->comment('二维码图片id');
            $table->integer('browse_num')->default(0)->comment('浏览量');
            $table->integer('attention_num')->default(0)->comment('关注数量');
            $table ->integer('sort')->default(0)->comment('排序');
            $table->integer('status')->default(0)->comment('状态');
            $table -> softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
